home *** CD-ROM | disk | FTP | other *** search
/ CICA 1995 September (Japanese) / CICA Shareware for Windows CD-ROM (Walnut Creek) (September 1995) (Japanese) (Disc 2).iso / disc2 / patches / symantec / pro61.exe / MFCSAM.EXE / DOCTEMP / DOCTEMP.CPP next >
Encoding:
C/C++ Source or Header  |  1993-09-22  |  4.2 KB  |  187 lines

  1. // Filename: DOCTEMP.CPP                                    
  2. // "DOCTEMP" Generated by Visual Programmer
  3. // Author:   Blue Sky                                          
  4.  
  5. // 
  6. // ***********************************************************************
  7. // Code in this file is initially generated by the Switch-It Module.
  8. // This file contains functions you can change
  9. // to provide whatever functionality you require.
  10. // 
  11. // 
  12. // 
  13. // For more information,
  14. // see the section "How code is generated" in the documentation.
  15. // 
  16. // ***********************************************************************
  17. // 
  18.  
  19. #include "AFXWIN.H"
  20. #include "DOCTEMP.H"
  21.  
  22. WMPDEBUG
  23.  
  24. #ifdef _DEBUG
  25. #undef THIS_FILE
  26. static char BASED_CODE THIS_FILE[] = __FILE__;
  27. #endif
  28.  
  29.  
  30. #include "DOCTEMP.WMC"
  31.     
  32.     
  33.     
  34.  
  35.  
  36. // *********************************************************************
  37. // Creates the application object.  Sets the ball in
  38. // motion for the entire application.
  39. // *********************************************************************
  40.  
  41. Cwm_Application  TheApp;
  42.  
  43.  
  44.  
  45. // *************************************************************
  46. // Member Functions for Class: Cwm_Application
  47. // Base Class                : Cwm_BaseApplication
  48. // Derived from MFC Class    : CWinApp
  49. // *************************************************************
  50.  
  51. // The User application class. In this class, you can override any
  52. // member functions in base classes you need to, and add your own
  53. // functionality.
  54.  
  55.  
  56.  
  57. BEGIN_MESSAGE_MAP( Cwm_Application, Cwm_BaseApplication )
  58.  
  59.     // YOU CAN ADD YOUR OWN CODE HERE
  60.     ON_COMMAND(IDM_New, CWinApp::OnFileNew)
  61.     ON_COMMAND(IDM_Open, CWinApp::OnFileOpen)
  62.  
  63.     //{{SIM_MSG_MAP(Cwm_Application)
  64.     // DO NOT EDIT what you see in this block of generated code.
  65.  
  66.     //}}SIM_MSG_MAP(Cwm_Application)
  67.  
  68. END_MESSAGE_MAP()
  69.  
  70.  
  71. // Initialization for the first instance of the application
  72. BOOL Cwm_Application::InitApplication()
  73. {
  74.     return Cwm_BaseApplication::InitApplication();
  75. }
  76.  
  77.  
  78. // Initialize this instance of the application
  79. BOOL Cwm_Application::InitInstance()
  80. {
  81.     if (!Cwm_BaseApplication::InitInstance())
  82.         return FALSE;
  83.  
  84.     AddDocTemplate(new CMultiDocTemplate(IDR_DOCUMENT,
  85.             RUNTIME_CLASS(CMyDoc),
  86.             RUNTIME_CLASS(Cwm_MDICHILDWnd),
  87.             RUNTIME_CLASS(Cwm_VIEWWnd)));
  88.  
  89.     // create a new (empty) document
  90.     OnFileNew();
  91.     return TRUE;
  92. }
  93.  
  94.  
  95. // Exit for this instance of the application
  96. BOOL Cwm_Application::ExitInstance()
  97. {
  98.     return Cwm_BaseApplication::ExitInstance();
  99. }
  100.  
  101.  
  102. // *************************************************************
  103. //   C Startup function for main window 
  104. // *************************************************************
  105.  
  106. Cwm_MainWnd* BLDMainCreateWnd(CWnd *pAParent)
  107.     {
  108.     Cwm_MainWnd *pWnd;
  109.  
  110.     // Create the object
  111.     pWnd = new Cwm_MainWnd();
  112.     if (!pWnd)
  113.         return NULL;
  114.  
  115.     // Create the window
  116.     pWnd->SimInitWindow(pAParent);
  117.  
  118.     return pWnd;
  119.     }
  120.  
  121.  
  122.  
  123. // *************************************************************
  124. // Member Functions for Class: Cwm_MainWnd
  125. // Base Class                : Cwm_MainBaseWnd
  126. // Derived from MFC Class    : CWnd
  127. // *************************************************************
  128.  
  129. // The User main window class. In this class, you can override any
  130. // member functions in base classes you need to, and add your own
  131. // functionality.
  132.  
  133.  
  134. IMPLEMENT_DYNCREATE( Cwm_MainWnd, Cwm_MainBaseWnd )
  135.  
  136. BEGIN_MESSAGE_MAP( Cwm_MainWnd, Cwm_MainBaseWnd )
  137.  
  138.     //{{SIM_MSG_MAP(Cwm_MainWnd)
  139.     // DO NOT EDIT what you see in this block of generated code.
  140.     //}}SIM_MSG_MAP(Cwm_MainWnd)
  141.  
  142.     // YOU CAN ADD YOUR OWN CODE HERE
  143.  
  144. END_MESSAGE_MAP()
  145.  
  146.  
  147. Cwm_MainWnd::Cwm_MainWnd()
  148.     : Cwm_MainBaseWnd()
  149. {
  150. }
  151.  
  152.  
  153. Cwm_MainWnd::~Cwm_MainWnd()
  154. {
  155. }
  156.  
  157.  
  158. //{{SIM_MSG_BODY(Cwm_MainWnd)
  159. // Message Handler Functions for you to edit will come here.
  160.  
  161.  
  162.  
  163.  
  164.  
  165.  
  166.  
  167.  
  168. //}}SIM_MSG_BODY(Cwm_MainWnd)
  169.  
  170.  
  171. // *************************************************************
  172. // Cwm_Wnd diagnostics
  173.  
  174. #ifdef _DEBUG
  175. void Cwm_MainWnd::AssertValid() const
  176. {
  177.     Cwm_MainBaseWnd::AssertValid();
  178. }
  179.  
  180. void Cwm_MainWnd::Dump(CDumpContext& dc) const
  181. {
  182.     Cwm_MainBaseWnd::Dump(dc);
  183. }
  184.  
  185. #endif //_DEBUG
  186.  
  187.